#基础镜像
FROM openjdk:8-jre-alpine

COPY docker/wait-for.sh /

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone \
    && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk update \
    && apk add curl \
    && chmod +x /wait-for.sh && dos2unix /wait-for.sh 

#拷贝lib
COPY target/libs/*.jar /libs/

#拷贝发布包
COPY target/*.jar  /app.jar

EXPOSE 8080

CMD ["--server.port=8080"]

#启动脚本
ENTRYPOINT ["java","-jar","/app.jar"]